package com.gingko.duominuo.data.source.local

import androidx.room.TypeConverter
import com.gingkor.common.ext.toBeanList
import com.gingkor.common.ext.toJson
import com.google.gson.reflect.TypeToken

class StringConverter {
    @TypeConverter
    fun objectToString(list: List<String>): String {
        return list.toJson()
    }

    @TypeConverter
    fun stringToObject(json: String): List<String> {
        return json.toBeanList()
    }
}